package com.cxytiandi.sharding.service;

import com.cxytiandi.sharding.po.Order;
import com.cxytiandi.sharding.repository.OrderRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderRepository repository;

    @Override
    public Long insertOrder(Order order) {
        return repository.addOrderInfo(order);
    }

    @Override
    public List<Map<String, Object>> selectInfo(Long orderId) {
        return repository.getInfo(orderId);
    }

    @Override
    public List<Map<String, Object>> pageDetail() {
        return repository.pageInfo();
    }
}
